package java8_11;

/**
 * @author oldliu
 * @since 1.0
 */
public class Arr3 {
    public static void main(String[] args) {
        //求和
        int[]a2={1,4,44,78,16,14,23,99};
        int sum=0;
        for(int i=0;i<a2.length;i++){
            System.out.println("第"+(i+1)+"个是："+a2[i]);
        }
        for(int i=0;i<a2.length;i++){
           sum+=a2[i];
        }
        System.out.println("和是："+sum);
    }
}
